package blocos;

public class BlockEmptyRoom extends Block {

	void attachRight (Block a ) throws DiferentsBlocks
	{
		if (a instanceof blocos.BlockPresence )
		{
			super.attachRight(a);
			if(((BlockThermometer)a).value.compareTo("1") == 0)
				((BlockThermometer)a).flipSwitch();

		}
		else
		{
		    throw new DiferentsBlocks();
		}
	}
	
	void attachLeft (Block a ) throws DiferentsBlocks
	{
		if (a instanceof blocos.BlockPresence )
		{
			super.attachLeft(a);
			if(((BlockThermometer)a).value.compareTo("1") == 0)
				((BlockThermometer)a).flipSwitch();
		}
		else
		{
		    throw new DiferentsBlocks();
		}
	}
	
	void attachTop (Block a ) throws DiferentsBlocks
	{
		if (a instanceof blocos.BlockPresence )
		{
			super.attachTop(a);
			if(((BlockThermometer)a).value.compareTo("1") == 0)
				((BlockThermometer)a).flipSwitch();
		}
		else
		{
		    throw new DiferentsBlocks();
		}
	}
	
	void attachBottom (Block a ) throws DiferentsBlocks
	{
		if (a instanceof blocos.BlockPresence )
		{
			super.attachBottom(a);
			if(((BlockThermometer)a).value == "1")
				((BlockThermometer)a).flipSwitch();
		}
		else
		{
		    throw new DiferentsBlocks();
		}
	}
	@Override
	public String[] save() {
		// TODO Auto-generated method stub
		return null;
	}

}
